/**
 * Created by GYL on 2018/7/25
 */
import React, { Component } from 'react';
import { Tabs, Tag, Popover, message, Modal } from 'antd';
import FiltrateUpgrade from '../../../components/common/FiltrateUpgrade';
import Container from '../../../components/common/Container';
import MyTable from '../../../components/common/MyTable';
import PublicService from '../../../services/PublicService';
import MyModal from '../../../components/common/MyModal';
import AddModal from './sub/AddModal';
import request from '../../../utils/request';
import moment from 'moment';
import MyPagination from '../../../components/common/MyPagination';
const TabPane = Tabs.TabPane;
var dataSource1 = [

]

var title1 = "餐饮场所名称";
var title2 = "供气企业";
class GasStationCallGove extends Component {

    constructor(props) {
        super(props)


        this.state = {
            page: 1,
            rows: 10,
            total: 0,
            btn:"保存",
            EditId: "",
            text: "瓶装气商业用气场所安全检查考核评分表",
            totalArr: [],
            bottomArr: [],
            footerArr: [],
            moddleArr: [],
            headerArr: [],
            loading: false,
            visible: false,
            selectedRowKeys: [],
            selectedRows: [],
            dataSource: [],
            pageIndex: 1,
            pageSize: 10,
            addModal: false,
            modalBtnLoading: false,
            customerName: " ",
            columns: [
                {
                    title: '序号',
                    dataIndex: 'num',
                    width: '5%',
                    align: "center",
                },
                {
                    title: '检查考核时间',
                    dataIndex: 'takeTime',
                    width: '15%',
                    align: "center",
                },
                {
                    title: "报表名称",
                    dataIndex: 'reportChineseName',
                    width: '22%',
                    align: "center",
                    render: (text) => <span>{text ? text : '/'}</span>
                },
                {
                    title: '被检查单位',
                    width: '20%',
                    dataIndex: 'supplystation',
                    align: "center",
                },
                {
                    title: '检查考核人',
                    dataIndex: 'assessor',
                    width: '12%',
                    align: "center",
                },
                {
                    title: '得分',
                    dataIndex: 'score',
                    width: '8%',
                    align: "center",
                },
                {
                    title: '操作',
                    dataIndex: 'userName',
                    width: '10%',
                    align: "center",
                    render: (text, record) => {
                        return <span>
                            <Tag color="#108ee9" onClick={this.onEdit.bind(this, record)}>编辑</Tag>
                            <Tag color="#87d068" onClick={this.onCheck.bind(this, record)}>查看</Tag>
                        </span>

                    }
                },

            ]

        }



    }

    componentDidMount() {

        this.onSubmit()
    }


    showModal = () => {
        this.setState({
            visible: true,
        });
    }

    handleOk = (e) => {
        console.log(e);
        this.setState({
            visible: false,
        });
    }

    handleCancel = (e) => {
        console.log(e);
        this.setState({
            visible: false,
        });
    }
    //查询
    onSubmit = (page, size, val) => {
        this.setState({
            loading: true
        })
        console.log(page, size, val)
        this.setState({
            text: this.state.customerName
        })

        if (this.state.customerName == "瓶装气供应站(点)安全检查考核评分表") {

            let data = {
                customerName: val && val.customerName ? val.customerName : "",
                supplystation: val && val.supplystation ? val.supplystation : "",
                takeTime: val && val.takeTime ? moment(val.takeTime).format("YYYY-MM-DD") : "",
                assessor: val && val.assessor ? val.assessor : "",
                reportName: "pzqgyz",
                type: 1,
                page, rows: size
            }
            request({
                url: '/zhrq-web/report/common/getPageList',
                method: 'POST',
                data: data
            }).then(data => {
                if (data.rc == 0) {
                    data.ret.items.forEach((item) => {
                        item.takeTime = moment(item.takeTime).format("YYYY-MM-DD HH:mm")
                    })
                }
                console.log(data)
                this.setState({
                    dataSource: data.ret.items,
                    total:data.retrowCount
                })
                setTimeout(() => {
                    this.setState({
                        loading: false
                    })
                }, 500)
            })

        } else if (this.state.customerName == "瓶装气商业用气场所安全检查考核评分表") {

            let data = {
                customerName: val && val.customerName ? val.customerName : "",
                supplystation: val && val.supplystation ? val.supplystation : "",
                takeTime: val && val.takeTime ? moment(val.takeTime).format("YYYY-MM-DD") : "",
                assessor: val && val.assessor ? val.assessor : "",
                page, rows: size,
                reportName: "pzqsyyqcs",
                type: 1
            }
            request({
                url: '/zhrq-web/report/common/getPageList',
                method: 'POST',
                data: data
            }).then(data => {
                if (data.rc == 0) {
                    data.ret.items.forEach((item) => {
                        item.takeTime = moment(item.takeTime).format("YYYY-MM-DD HH:mm")
                    })
                }
                console.log(data)
                this.setState({
                    dataSource: data.ret.items,
                    total:data.retrowCount
                })
                setTimeout(() => {
                    this.setState({
                        loading: false
                    })
                }, 500)
            })
        } else {
            let data = {
                customerName: val && val.customerName ? val.customerName : "",
                supplystation: val && val.supplystation ? val.supplystation : "",
                takeTime: val && val.takeTime ? moment(val.takeTime).format("YYYY-MM-DD") : "",
                assessor: val && val.assessor ? val.assessor : "",
                page, rows: size,
                reportName: "",
                type: 1
            }
            request({
                url: '/zhrq-web/report/common/getPageList',
                method: 'POST',
                data: data
            }).then(data => {
                if (data.rc == 0) {
                    data.ret.items.forEach((item) => {
                        item.takeTime = moment(item.takeTime).format("YYYY-MM-DD HH:mm")
                    })
                }
                console.log(data)
                this.setState({
                    dataSource: data.ret.items,
                    total:data.retrowCount
                })
                setTimeout(() => {
                    this.setState({
                        loading: false
                    })
                }, 500)
            })
        }












    };

    //下拉改变
    onSelectedChange = (fun, nextParams, paramName, nextParams2, value) => {

        this.setState({
            customerName: fun.customerName
        })

    }

    //删除按钮
    setDelConfirm = () => {
        if (this.state.selectedRows.length < 1) {
            message.error('请选择删除对象!');
            return
        }


        let data = []
        this.state.selectedRows.forEach((item) => {
            data.push({ id: item.reportId, reportName: item.reportName })
        })
        console.log(this.state.selectedRows)

        if (this.state.selectedRows[0].reportName  == "pzqgyz") {
            request({
                url: '/zhrq-web/report/bottledgasSupplystationScore/deleteInBatch',
                method: 'POST',
                data: data
            }).then(data => {
                if (data.rc == 0) {
                    this.setState({
                        selectedRowKeys: [],
                        selectedRows: [],
                    })
                    this.onSubmit(1, 10)
                    message.success("删除成功")
                }
            })
        }

        if (this.state.selectedRows[0].reportName  == "pzqsyyqcs") {
            request({
                url: '/zhrq-web/report/commercialuseofbottledgas/delete',
                method: 'POST',
                data: data
            }).then(data => {
                if (data.rc == 0) {
                    this.onSubmit(1, 10)
                    message.success("删除成功")
                    this.setState({
                        selectedRowKeys: [],
                        selectedRows: []
                    })
                }
            })
        }



    }


    onSelectChange = (keys, rows) => {
        console.log(rows)
        this.setState({
            selectedRowKeys: keys,
            selectedRows: rows
        });
    };

    //新增按钮
    addBtnText1 = (v) => {

        if (v == "瓶装气供应站(点)安全检查考核评分表") {
            request({
                url: '/zhrq-web/report/common/getContent?type=2',
                method: 'GET',
            }).then(data => {
                console.log(data)
                if (data.rc == 0) {
                    data.ret.information.forEach((item, index) => {
                        item.paramName = item.assessId
                    })
                    data.ret.vetoItem.forEach((item, index) => {
                        item.paramName = item.itemVetoId
                    })
                    this.setState({
                        totalArr: [
                            {
                                name: "总分",
                                paramName: "score",
                                key: "1"
                            }
                        ],
                        headerArr: [
                            {
                                name: "被检供应站名称",
                                paramName: "supplystation",
                                key: "1"
                            },
                            {
                                name: "被检查人",
                                paramName: "beInspector",
                                key: "2"
                            }
                        ],
                        bottomArr: [
                            {
                                type: 'input',
                                name: "检查考核人",
                                paramName: "assessor",
                                key: "1"
                            },
                            {
                                type: "datePicker",
                                name: "检查考核时间",
                                paramName: "takeTime",
                                key: "2"
                            }
                        ],
                        moddleArr: data.ret.information,
                        footerArr: data.ret.vetoItem,
                        addModal: true,
                        
                    })

                }
            })
        } else if (v == "瓶装气商业用气场所安全检查考核评分表") {
            request({
                url: '/zhrq-web/report/common/getContent?type=1',
                method: 'GET',
            }).then(data => {
                console.log(data)
                if (data.rc == 0) {
                    data.ret.information.forEach((item, index) => {
                        item.paramName = item.assessId
                    })
                    data.ret.vetoItem.forEach((item, index) => {
                        item.paramName = item.itemVetoId
                    })
                    this.setState({
                        totalArr: [
                            {
                                name: "总分",
                                paramName: "score",
                                key: "1"
                            }
                        ],
                        headerArr: [
                            {
                                name: "餐饮场所名称",
                                paramName: "cateringName",
                                key: "1"
                            },
                            {
                                name: "地址",
                                paramName: "site",
                                key: "2"
                            },
                            {
                                name: "供气企业",
                                paramName: "enterprise",
                                key: "3"
                            }

                        ],
                        bottomArr: [
                            {
                                type: 'input',
                                name: "检查考核人",
                                paramName: "assessor",
                                key: "1"
                            },
                            {
                                type: "datePicker",
                                name: "检查考核时间",
                                paramName: "takeTime",
                                key: "2"
                            }
                        ],
                        moddleArr: data.ret.information,
                        footerArr: data.ret.vetoItem,
                        addModal: true
                    })

                }
            })
        }

    }

    addBtnText = () => {
        this.setState({
            btn:"保存",
            visible: true,
        });
    }

    onModel = (v) => {
        this.setState({
            visible: false
        })
        console.log(v)
        this.setState({
            customerName: v
        })
        setTimeout(() => {
            this.addBtnText1(v)
        }, 500)


    }

    //保存按钮
    ModalOk = (val, type, v) => {
        let t = this;
        var data = {}
        if (this.state.EditId !== "") {
            data.id = this.state.EditId
        }
        var informationList = [];
        var vetoItemList = [];
        for (var index in val) {
            this.state.moddleArr.forEach((item, i) => {
                if (index == item.assessId) {
                    informationList.push({
                        "assessAndStandard": {
                            "id": index
                        }, "score": val[index]
                    })
                }
            })

            this.state.footerArr.forEach((item, i) => {
                if (index == item.itemVetoId) {
                    vetoItemList.push({
                        "itemVeto": {
                            "id": index
                        }, "veto": val[index] == true ? 1 : 0
                    })
                }
            })

        }
        data.informationList = informationList
        data.vetoItemList = vetoItemList

        if (this.state.customerName == '瓶装气供应站(点)安全检查考核评分表') {
            data.type = 1
            data.assessor = val.assessor;
            data.beInspector = val.beInspector;
            data.score = val.score;
            data.supplystation = val.supplystation;
            data.takeTime = moment(val.takeTime).format("YYYY-MM-DD")

            setTimeout(() => {
                // console.log(informationList)
                console.log(data, val)
                request({
                    url: '/zhrq-web/report/bottledgasSupplystationScore/insert',
                    method: 'POST',
                    data: data
                }).then(data => {
                    console.log(data)
                    if (data.rc == 0) {
                        this.setState({
                            EditId: "",
                            customerName:""
                        })
                        // message.success("新增成功")
                        this.onSubmit(1, 10)
                    }
                })
            }, 500);
        } else if (this.state.customerName == '瓶装气商业用气场所安全检查考核评分表') {
            data.type = 1
            data.assessor = val.assessor;
            data.cateringName = val.cateringName;
            data.enterprise = val.enterprise;
            data.score = val.score;
            data.site = val.site;
            data.takeTime = moment(val.takeTime).format("YYYY-MM-DD HH")
            setTimeout(() => {
                // console.log(informationList)
                console.log(data, val)
                request({
                    url: '/zhrq-web/report/commercialuseofbottledgas/save',
                    method: 'POST',
                    data: data
                }).then(data => {
                    console.log(data)
                    if (data.rc == 0) {
                        this.setState({
                            EditId: "",
                            customerName:""
                        })
                        // message.success("新增成功")
                        this.onSubmit(1, 10)
                    }
                })
            }, 500);
        }





        this.setState({
            addModal: false,
            modalBtnLoading: true
        });
    }

    // 取消保存
    ModalCancel = (type) => {
        let t = this;
        t.setState({
            [type]: false,
            modalBtnLoading: false
        })
    };

    //编辑按钮
    onEdit = (record) => {
        console.log(record.reportChineseName)
        this.setState({
            EditId: record.reportId,
            btn:"保存"
        })
        if (record.reportName  == "pzqsyyqcs") {
            this.setState({
                customerName: "瓶装气商业用气场所安全检查考核评分表"
            })
            request({
                url: '/zhrq-web/report/commercialuseofbottledgas/findOneById',
                method: 'POST',
                data: { id: record.reportId }
            }).then(data => {
                console.log(data)
                if (data.rc == 0) {
                    data.ret.commercialUseOfBottledGasInformationDtoList.forEach((item, index) => {
                        item.paramName = item.assessId
                        item.initialValue = item.score
                    })
                    data.ret.commercialUseOfBottledGasVetoItemDtoList.forEach((item, index) => {
                        item.paramName = item.itemVetoId
                        item.initialValue = item.veto
                    })
                    if (data.ret.score === 0) {
                        data.ret.score = "0"
                    }
                    this.setState({
                        totalArr: [
                            {
                                name: "总分",
                                paramName: "score",
                                key: "1",
                                initialValue: data.ret.score
                            }
                        ],
                        headerArr: [
                            {
                                name: "餐饮场所名称",
                                paramName: "cateringName",
                                key: "1",
                                initialValue: data.ret.cateringName
                            },
                            {
                                name: "地址",
                                paramName: "site",
                                key: "2",
                                initialValue: data.ret.site
                            },
                            {
                                name: "供气企业",
                                paramName: "enterprise",
                                key: "3",
                                initialValue: data.ret.enterprise
                            }

                        ],
                        bottomArr: [
                            {
                                type: 'input',
                                name: "检查考核人",
                                paramName: "assessor",
                                key: "1",
                                initialValue: data.ret.assessor
                            },
                            {
                                type: "datePicker",
                                name: "检查考核时间",
                                paramName: "takeTime",
                                key: "2",
                                initialValue: moment(data.ret.takeTime)
                            }
                        ],
                        moddleArr: data.ret.commercialUseOfBottledGasInformationDtoList,
                        footerArr: data.ret.commercialUseOfBottledGasVetoItemDtoList,
                        addModal: true
                    })
                }
            })
        }
        if (record.reportName  == "pzqgyz") {
            this.setState({
                customerName: "瓶装气供应站(点)安全检查考核评分表"
            })
            request({
                url: `/zhrq-web/report/bottledgasSupplystationScore/getBottledgasSupplystationScore?id=${record.reportId}`,
                method: 'GET',

            }).then(data => {
                console.log(data)
                if (data.rc == 0) {
                    data.ret.bottledgasSupplystationScoreInformationDtoList.forEach((item, index) => {
                        item.paramName = item.assessId
                        item.initialValue = item.score
                    })
                    data.ret.bottledgasSupplystationScoreVetoItemDtoList.forEach((item, index) => {
                        item.paramName = item.itemVetoId
                        item.initialValue = item.veto
                    })

                    if (data.ret.score === 0) {
                        data.ret.score = "0"
                    }
                    this.setState({
                        totalArr: [
                            {
                                name: "总分",
                                paramName: "score",
                                key: "1",
                                initialValue: data.ret.score
                            }
                        ],
                        headerArr: [
                            {
                                name: "被检供应站名称",
                                paramName: "supplystation",
                                key: "1",
                                initialValue: data.ret.supplystation
                            },
                            {
                                name: "被检查人",
                                paramName: "beInspector",
                                key: "2",
                                initialValue: data.ret.beInspector
                            },


                        ],
                        bottomArr: [
                            {
                                type: 'input',
                                name: "检查考核人",
                                paramName: "assessor",
                                key: "1",
                                initialValue: data.ret.assessor
                            },
                            {
                                type: "datePicker",
                                name: "检查考核时间",
                                paramName: "takeTime",
                                key: "2",
                                initialValue: moment(data.ret.takeTime)
                            }
                        ],
                        moddleArr: data.ret.bottledgasSupplystationScoreInformationDtoList,
                        footerArr: data.ret.bottledgasSupplystationScoreVetoItemDtoList,
                        addModal: true
                    })
                }
            })
        }
    }
    //查看按钮
    onCheck = (record) => {
        this.setState({
            EditId: record.reportId,
            btn:"关闭"
        })
        if (record.reportName  == "pzqsyyqcs") {
            this.setState({
                customerName: "瓶装气商业用气场所安全检查考核评分表"
            })
            request({
                url: '/zhrq-web/report/commercialuseofbottledgas/findOneById',
                method: 'POST',
                data: { id: record.reportId }
            }).then(data => {
                console.log(data)
                if (data.rc == 0) {
                    data.ret.commercialUseOfBottledGasInformationDtoList.forEach((item, index) => {
                        item.paramName = item.assessId
                        item.initialValue = item.score
                        item.disabled = true
                    })
                    data.ret.commercialUseOfBottledGasVetoItemDtoList.forEach((item, index) => {
                        item.paramName = item.itemVetoId
                        item.initialValue = item.veto
                        item.disabled = true
                    })
                    if (data.ret.score === 0) {
                        data.ret.score = "0"
                    }
                    this.setState({
                        totalArr: [
                            {
                                name: "总分",
                                paramName: "score",
                                key: "1",
                                initialValue: data.ret.score,
                                disabled: true
                            }
                        ],
                        headerArr: [
                            {
                                name: "餐饮场所名称",
                                paramName: "cateringName",
                                key: "1",
                                initialValue: data.ret.cateringName,
                                disabled: true
                            },
                            {
                                name: "地址",
                                paramName: "site",
                                key: "2",
                                initialValue: data.ret.site,
                                disabled: true
                            },
                            {
                                name: "供气企业",
                                paramName: "enterprise",
                                key: "3",
                                initialValue: data.ret.enterprise,
                                disabled: true
                            }

                        ],
                        bottomArr: [
                            {
                                type: 'input',
                                name: "检查考核人",
                                paramName: "assessor",
                                key: "1",
                                initialValue: data.ret.assessor,
                                disabled: true
                            },
                            {
                                type: "datePicker",
                                name: "检查考核时间",
                                paramName: "takeTime",
                                key: "2",
                                initialValue: moment(data.ret.takeTime),
                                disabled: true
                            }
                        ],
                        moddleArr: data.ret.commercialUseOfBottledGasInformationDtoList,
                        footerArr: data.ret.commercialUseOfBottledGasVetoItemDtoList,
                        addModal: true
                    })
                }
            })
        }
        if (record.reportName  == "pzqgyz") {
            this.setState({
                customerName: "瓶装气供应站(点)安全检查考核评分表"
            })
            request({
                url: `/zhrq-web/report/bottledgasSupplystationScore/getBottledgasSupplystationScore?id=${record.reportId}`,
                method: 'GET',

            }).then(data => {
                console.log(data)
                if (data.rc == 0) {
                    data.ret.bottledgasSupplystationScoreInformationDtoList.forEach((item, index) => {
                        item.paramName = item.assessId
                        item.initialValue = item.score
                        item.disabled = true
                    })
                    data.ret.bottledgasSupplystationScoreVetoItemDtoList.forEach((item, index) => {
                        item.paramName = item.itemVetoId
                        item.initialValue = item.veto
                        item.disabled = true
                    })
                    if (data.ret.score === 0) {
                        data.ret.score = "0"
                    }

                    this.setState({
                        totalArr: [
                            {
                                name: "总分",
                                paramName: "score",
                                key: "1",
                                initialValue: data.ret.score,
                                disabled: true
                            }
                        ],
                        headerArr: [
                            {
                                name: "被检供应站名称",
                                paramName: "supplystation",
                                key: "1",
                                initialValue: data.ret.supplystation,
                                disabled: true
                            },
                            {
                                name: "被检查人",
                                paramName: "beInspector",
                                key: "2",
                                initialValue: data.ret.beInspector,
                                disabled: true
                            },


                        ],
                        bottomArr: [
                            {
                                type: 'input',
                                name: "检查考核人",
                                paramName: "assessor",
                                key: "1",
                                initialValue: data.ret.assessor,
                                disabled: true
                            },
                            {
                                type: "datePicker",
                                name: "检查考核时间",
                                paramName: "takeTime",
                                key: "2",
                                initialValue: moment(data.ret.takeTime),
                                disabled: true
                            }
                        ],
                        moddleArr: data.ret.bottledgasSupplystationScoreInformationDtoList,
                        footerArr: data.ret.bottledgasSupplystationScoreVetoItemDtoList,
                        addModal: true
                    })
                }
            })
        }
    }

    //分页器
    onChangePage = (page, size) => {
        this.onSubmit(page, size);
        this.setState({
            page,
            rows: size,
            pageIndex: page,
            pageSize: size
        })
    };

    render() {

        const { total, loading, selectedRowKeys, dataSource, pageIndex, pageSize, addModal, modalBtnLoading } = this.state

        const items = [
            {
                type: 'select',
                label: '报表名称',
                paramName: 'customerName',
                placeholder: '请输入',
                style: { width: 300 },
                options: [
                    { text: '全部', value: '' },
                    { text: '瓶装气商业用气场所安全检查考核评分表', value: '瓶装气商业用气场所安全检查考核评分表' },
                    { text: '瓶装气供应站(点)安全检查考核评分表', value: '瓶装气供应站(点)安全检查考核评分表' },
                ]
            },

            {
                type: 'input',
                label: "被检单位名称",
                paramName: 'supplystation',
                placeholder: '请输入',
                width: 200
            },

            {
                type: 'datePicker',
                label: '检查考核时间',
                paramName: 'takeTime',
                placeholder: '请输入',
                width: 200
            },

            {
                type: 'input',
                label: '检查考核人',
                paramName: 'assessor',
                placeholder: '请输入',
                width: 200
            },
        ];

        let rowSelection = {
            selectedRowKeys,
            onChange: this.onSelectChange,
        };

        const windowWidth = document.body.clientWidth;

        const height = document.body.clientHeight;
        let containerHeight = '75vh';
        if (windowWidth > 1367) {
            containerHeight = '77vh';
        }

        return (
            <div>
                <Modal
                    centered={true}
                    footer={null}
                    destroyOnClose={true}
                    style={{ top: 150, right: 500 }}
                    title="请选择报表"
                    visible={this.state.visible}
                    onOk={this.handleOk}
                    onCancel={this.handleCancel}
                >
                    <p style={{ cursor: "pointer" }} onClick={this.onModel.bind(this, "瓶装气商业用气场所安全检查考核评分表")}>瓶装气商业用气场所安全检查考核评分表</p>
                    <p style={{ cursor: "pointer" }} onClick={this.onModel.bind(this, "瓶装气供应站(点)安全检查考核评分表")} >瓶装气供应站(点)安全检查考核评分表</p>

                </Modal>
                {
                    addModal &&
                    <AddModal
                        // type={type}
                        visible={addModal}
                        title={" "}
                        style={{height:"80vh"}}
                        // modalBtnLoading={modalBtnLoading}
                        footerShow={true}
                        onModalSave={this.ModalOk}
                        onCancel={this.ModalCancel.bind(this, 'addModal')}
                        customerName={this.state.customerName}
                        headerArr={this.state.headerArr}
                        moddleArr={this.state.moddleArr}
                        footerArr={this.state.footerArr}
                        bottomArr={this.state.bottomArr}
                        totalArr={this.state.totalArr}
                        footerTitle={this.state.btn}
                    />
                }
                <FiltrateUpgrade
                    items={items}
                    style={{ width: windowWidth > 1900 ? '71%' : '65%'}}
                    ref={ref => { this.f1 = ref }}
                    submit={this.onSubmit.bind(this, 1, 10)}
                    selectedChange={this.onSelectedChange}
                    // btnRight={true}
                    containerHeight={containerHeight}
                // height={"13vh"}
                />
                <Container
                    style={{ height: containerHeight }}
                    exportBtnShow={true}
                    exportBtn={this.exportBtn}
                    addBtnText={this.addBtnText}
                    // examineBtn={this.examineBtn}
                    // editBtn={this.editBtn}
                    // lockBtn={this.lockBtn}
                    // clearlockBtn={this.clearlockBtn}
                    setDelConfirm={this.setDelConfirm}
                    addBtnShow={true}
                    deleteBtnShow={true}
                // editBtnShow={true}
                // examineBtnShow={true}
                // lockBtnShow={true}
                // clearlockBtnShow={true}
                >
                    <div style={{ height: "62vh", overflow: "auto" }}>
                        <MyTable
                            // bordered
                            loading={loading}
                            columns={this.state.columns}
                            rowSelection={rowSelection}
                            pagination={false}
                            // scroll={{ y: windowWidth < 1400 ? height - 280 : height - 300 }}
                            dataSource={PublicService.transformArrayData(dataSource, true, true, pageIndex, pageSize)}
                        />

                    </div>
                    <MyPagination
                    
                        showPage
                        pageSize={pageSize}
                        current={pageIndex}
                        total={total}
                        showSizeChanger
                        showQuickJumper
                        onChange={this.onChangePage}
                        onShowSizeChange={this.onChangePage}
                    />
                </Container>


            </div>
        )
    }
}
export default (GasStationCallGove);
